package ToYesterday.Day01;

import java.util.ArrayList;
import java.util.List;

public class FizzBuzz_01 {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        int num = 16;
        for (int i = 1;i<=num;i++){
            if (i%5==0&&i%3==0){
//                System.out.print("\"fizz buzz\"");
                list.add("\"fizz buzz\"");
            }else if (i%5==0){
//                System.out.print("\"buzz\"");
                list.add("\"buzz\"");
            }else if (i%3==0){
//                System.out.print("\"fizz\"");
                list.add("\"fizz\"");
            }else {
//                System.out.print("\""+i+"\"");
                list.add(String.valueOf(i));
            }

            if (i!=num){
                list.add(",");
//                System.out.print(",");
            }
        }
        for (String list1 : list){
            System.out.print(list1);
        }
    }
}
